package com.hmily.dubbo.provider.spi.ioc.impl;

import com.hmily.dubbo.provider.spi.ioc.AnimalService;
import com.hmily.dubbo.provider.spi.ioc.HumanService;
import org.apache.dubbo.common.URL;

/**
 * <h1>Ioc服务包装类。</h1>
 *
 * @author hmilyylimh
 *         ^_^
 * @version 0.0.1
 *         ^_^
 * @date 2022-04-14
 *
 */
public class IocServiceWrapper implements HumanService {

    private HumanService humanService;
    private AnimalService catService;
    private AnimalService rabbitService;
    private AnimalService cat;

    public IocServiceWrapper(HumanService humanService) {
        this.humanService = humanService;
    }

    public void setCat(AnimalService catService){
        this.cat = catService;
    }

    public void setCatService(AnimalService catService){
        this.catService = catService;
    }

    public void setRabbitService(AnimalService rabbitService){
        this.rabbitService = rabbitService;
    }

    @Override
    public String getName(URL url) {
        return humanService.getName(url);
    }
}
